package com.faiz.generic.mylist;

public class MyList<T> {
    private T[] list;

    public void setList(T[] list) {
        this.list = list;
    }

    public T get(int index) {
        if (index < list.length) {
            return (T) list[index];
        } else {
            return null;
        }
    }
}
